
package net.biaji.android.alephclient.data;

import android.provider.BaseColumns;

public abstract class DataContract implements BaseColumns {

    public abstract class Books implements BaseColumns {
        /**
         * 记录状态不完整。获取书籍详情时需要从网络读取
         */
        public static final int BOOK_STATUS_SIMPLE = 1;

        /**
         * 记录状态正常，可直接使用
         */
        public static final int BOOK_STATUS_NORMAL = 0;

        /**
         * 数据库中无此书信息
         */
        public static final int BOOK_NOT_SAVED = -1;

        public static final String TABLE_NAME = "books";

        public static final String INDEX_NAME_BOOKSN = "booksn";

        public static final String COLUMN_NAME_SN = "sn";

        public static final String COLUMN_NAME_STANDARD_NUM = "standard_num";

        public static final String COLUMN_NAME_ISBN = "isbn";

        public static final String COLUMN_NAME_NAME = "name";

        public static final String COLUMN_NAME_OTHER_NAME = "other_name";

        public static final String COLUMN_NAME_AUTHORS = "authors";

        public static final String COLUMN_NAME_PUBLISHER = "publisher";

        public static final String COLUMN_NAME_DESCRIBE = "describe";

        public static final String COLUMN_NAME_PRICE = "price";

        public static final String COLUMN_NAME_COVER_URL = "cover_url";

        public static final String COLUMN_NAME_MEDIA_TYPE = "media_type";

        public static final String COLUMN_NAME_PUBLISH_DATE = "publish_date";

        public static final String COLUMN_NAME_STATUS = "status";

    }

    /**
     * 搜索关键词历史
     * 
     * @author biaji
     */
    public abstract class Keywords implements BaseColumns {
        public static final String TABLE_NAME = "keywords";

        public static final String COLUMN_NAME_KEYWORD = "keyword";

        public static final String COLUMN_NAME_SEARCHDATE = "search_date";

        public static final String COLUMN_NAME_SEARCHTIMES = "times";
    }

    /**
     * 搜索对应表
     * 
     * @author
     */
    public abstract class SearchMap implements BaseColumns {
        public static final String TABLE_NAME = "search_map";

        public static final String COLUMN_NAME_KEYWORD_ID = "keyword_id";

        public static final String COLUMN_NAME_BOOK_ID = "book_id";
    }

    /**
     * 个人书架。曾经借阅的图书自动添加
     * 
     * @author biaji
     */
    public abstract class Shelf implements BaseColumns {
        /**
         * 未曾保存过
         */
        public static final int STATUS_NOT_HERE = -1;

        /**
         * 当前在借书目
         */
        public static final int STATUS_INHAND = 1;

        /**
         * 历史书目
         */
        public static final int STATUS_HISTORY = 0;

        /**
         * 收藏书目
         */
        public static final int STATUS_FAV = 2;

        public static final String TABLE_NAME = "shelf";

        public static final String COLUMN_NAME_BOOKID = "book_id";

        /**
         * 续借号
         */
        public static final String COLUMN_NAME_EXTEND_CODE = "extend_code";

        /**
         * 添加至书架的时间
         */
        public static final String COLUMN_NAME_ADD_DATE = "add_date";

        public static final String COLUMN_NAME_BORROW_DATE = "borrow_date";

        public static final String COLUMN_NAME_RETURN_DATE = "return_date";

        public static final String COLUMN_NAME_RETURN_DATE_EXPECTED = "return_date_expected";

        public static final String COLUMN_NAME_STATUS = "status";
    }

    public abstract class ViewBooksInPocket implements BaseColumns {
        public static final String VIEW_NAME = "bookinpocket";
    }
}
